<!DOCTYPE html>
<html style="overflow-x:auto;overflow-y:auto;">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>JAVIS电商用户行为分析与可视化平台</title>
	<script src="/static/manager/jquery-1.8.3.min.js" type="text/javascript"></script>
	<link href="/static/manager/bootstrap.min.css" type="text/css" rel="stylesheet" />
	<script src="/static/manager/bootstrap.min.js" type="text/javascript"></script>
	<link href="/static/manager/jeesite.css" type="text/css" rel="stylesheet" />
	<script src="/static/manager/jeesite.js" type="text/javascript"></script>
	<script type="text/javascript">var ctx = '../a', ctxStatic='../static';</script>
	<script>var _hmt=_hmt||[];(function(){var hm=document.createElement("script");hm.src="//hm.baidu.com/hm.js?82116c626a8d504a5c0675073362ef6f";var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(hm,s);})();</script>
	<meta name="decorator" content="default">
	<script type="text/javascript">
		$(document).ready(function() {

		});

		function delSpider(id){
			let r = confirm('确认要删除该条记录吗？');
			if(r == true){
				document.location.href="/manager/deleteSpider/"+id;
				alert('删除成功!');
			}
		}

		function updateSpider(id){
			document.location.href="/manager/updateSpiderTask/"+id;
		}
	</script>
</head>
<body>

	<ul class="nav nav-tabs">
		<li class="active"><a href="saved_resource.html">采集任务列表信息</a></li>
	</ul>
	<form id="searchForm" class="breadcrumb form-search" action="/manager/spiderList/" method="post">
		<ul class="ul-form">
			<li><label>任务名称：</label>
				<input id="file_name" name="taskName" class="input-medium" type="text" value="" maxlength="100">
			</li>
			<li><label>任务类型：</label>
				<select name="type" htmlescape="false" maxlength="2" class="input-xlarge  select2-offscreen" tabindex="-1">
					<option value="">请选择</option>
					<option value="0">普通</option>
					<option value="1">紧急</option>
					<option value="2">特急</option>
				</select>
			</li>
			<li><label>任务状态：</label>
				<select name="status" htmlescape="false" maxlength="2" class="input-xlarge  select2-offscreen" tabindex="-1">
					<option value="">请选择</option>
					<option value="0">未完成</option>
					<option value="2">执行中</option>
					<option value="1">已完成</option>
				</select>
			</li>

			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"></li>
			<li class="clearfix"></li>
		</ul>
	</form>
<script type="text/javascript">top.$.jBox.closeTip();</script>

	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>编号</th>
				<th>任务名称</th>
				<th>任务url</th>
				<th>发布时间</th>
				<th>发布人</th>
				<th>开始时间</th>
				<th>结束结束</th>
				<th>采集时间</th>
				<th>执行人</th>
				<th>任务状态</th>
				<th>任务类型</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		{% for task in objects %}
			<tr>
				<td><a href="/manager/updateSpiderTask/{{task.id}}">
					{{task.id}}
				</a></td>
				<td>
					{{task.taskName}}
				</td>
				<td>
					{{task.taskUrl}}
				</td>
				<td>
					{{task.createTime}}
				</td>
				<td>
					{{task.createBy}}
				</td>
				<td>
					{{task.startTime}}
				</td>
				<td>
					{{task.endTime}}
				</td>
				<td>
					{% if task.executeTime == None%}
						&nbsp;
					{%else%}
						{{task.executeTime}}
					{% endif %}

				</td>
				<td>
					{% if task.executeBy == None%}
						&nbsp;
					{%else%}
						{{task.executeBy}}
					{% endif %}
				</td>

				<td>
                {% if task.status == 0 %}
                    未执行
                {% elif task.status == 1%}
                    执行中
                {% else %}
                    已完成
                {% endif %}
            </td>
            <td>
                {% if task.type == 0 %}
                    普通任务
                {% elif task.type == 1 %}
                    紧急任务
                {% else %}
                    特急任务
                {% endif %}
            </td>

				<td>
    				<a href="javascript:void(0)" onclick="updateSpider({{task.id}})">修改</a>
					<a href="javascript:void(0)" onclick="delSpider({{task.id}})">删除</a>
				</td>
			</tr>
		{% endfor %}

		</tbody>
	</table>
	<div class="pagination">
		<ul>
			<li class="active">
				<a class="left" href="?page=1"> 首页 </a>
			</li>
			<!--上一页-->
			{% if objects.has_previous %}
			<li class="active">
				<a class="left" href="?page={{ objects.previous_page_number }}">« 上一页</a>
			</li>
			{% else %}
				<li class="disabled">
					<a class="left" href="javascript:void(0)">« 上一页</a>
				</li>
			{% endif %}

			<!-- 下一页 -->
			{% if objects.has_next %}
			<li class="active">
				<a class="right" href="?page={{ objects.next_page_number }}">下一页 »</a>
			</li>
			{% else %}
				<li class="disabled"><a href="javascript:void(0)">下一页 »</a></li>
			{% endif %}
			<li class="active">
				<a class="right" href="?page={{ paginator.num_pages }}"> 尾页 </a>
			</li>
			<li class="disabled controls"><a href="javascript:void(0)">当前 <input type="text" value="{{page}}" > / <input type="text" value="{{pageSize}}"> 条，共 {{total}} 条</a></li>
		</ul>
		<div style="clear:both;"></div>
	</div>

	<script type="text/javascript">//<!-- 无框架时，左上角显示菜单图标按钮。
		if(!(self.frameElement && self.frameElement.tagName=="IFRAME")){
			$("body").prepend("<i id=\"btnMenu\" class=\"icon-th-list\" style=\"cursor:pointer;float:right;margin:10px;\"></i><div id=\"menuContent\"></div>");
			$("#btnMenu").click(function(){
				top.$.jBox('get:/jeesite/a/sys/menu/treeselect;JSESSIONID=3baf732ded45486a8f110d13601a4c9b', {title:'选择菜单', buttons:{'关闭':true}, width:300, height: 350, top:10});
				//if ($("#menuContent").html()==""){$.get("/jeesite/a/sys/menu/treeselect", function(data){$("#menuContent").html(data);});}else{$("#menuContent").toggle(100);}
			});
		}//-->
	</script>

</body></html>